package model

import (
	"gino/app/common"
)

// 状态 0-冻结 1-正常
const (
	UserStateFreeze = iota
	UserStateNormal
)

// User is the golang structure for table user.
type User struct {
	ID       int64  `orm:"id,primary" json:"id"`
	Username string `orm:"username"   json:"username"`
	Password string `orm:"password"   json:"password"`
	State    uint8  `orm:"state"  json:"state"`
}

// UserRegisterReq 注册输入参数
type UserRegisterReq struct {
	Username string `orm:"username"   json:"username"`
	Password string `orm:"password"   json:"password"`
}

type UserLoginReq struct {
	Username string `orm:"username"   json:"username"`
	Password string `orm:"password"   json:"password"`
}

type UserLoginResp struct {
	ID       int64  `json:"id"`
	Username string `json:"username"`
	Token    string `json:"token"`
}

type UserListReq struct {
	common.PageInfo
}
